package com.itggm.handlers;


import com.itggm.response.ResponseResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

 /**
  * @Author: ggm
  * @date:  2024/11/26
  * 全局异常处理
  */

@RestControllerAdvice
public class GlobalExceptionHandler {


    //  401


    // 403


    // 自定义业务异常



    @ExceptionHandler(Exception.class)
    public ResponseResult  allExceptionHandler(Exception e){
        e.printStackTrace();
        return ResponseResult.error();
    }


}
